import request from '@/common/request.js'
import { formatGetUri } from '@/common/util.js'

const api = {};
const LOGIN = 'login2';
//发送验证码
api.send_code = params => request.globalRequest(`${LOGIN}/send_code`, 'POST', params, 1)
//手机登录登录
api.login = params => request.globalRequest(`${LOGIN}/loginnew`, 'POST', params, 1)
//密码登录
api.password = params => request.globalRequest(`${LOGIN}/password`, 'POST', params, 1)
//确认邀请人
api.comforim = params => request.globalRequest(`${LOGIN}/comforim`, 'POST', params, 1)
//根据电话号码查找用户
api.find_phone = params => request.globalRequest(`${LOGIN}/find_phone`, 'POST', params, 1)
//验证用户手机号码
api.validate_msg_phone = params => request.globalRequest(`${LOGIN}/validate_msg_phone`, 'POST', params, 1)



// GET请求方式
//api.homeindex = params => request.globalRequest(`${PORT1}/index${formatGetUri(params)}`, 'GET',{}, 1)
export default api